package com.jimikongjian.models;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Repository;

import java.sql.Timestamp;

/**
 * Created by fuxiuyang on 17/2/19.
 */
@Scope("prototype")
@Repository("comment")
public class Comment {

    /**
     * 初始化id号，将id号置为-1
     */
    public static final int INIT_ID = -1;

    /**
     * 自身的id
     */
    private int id;

    /**
     * 评论者的id号，与user用户表中的id号对应
     */
    private int commentId = Comment.INIT_ID;

    /**
     * 评论者的昵称
     */
    private String commentNick;

    /**
     * 评论者的头像
     */
    private String commentAvatar;

    /**
     * 评论信息的内容
     */
    private String content;

    /**
     * 评论文章的id号
     */
    private  int articleId = Comment.INIT_ID;

    /**
     * 被评论的id号
     */
    private int commentParentId = Comment.INIT_ID;

    /**
     * 被评论者的id号
     */
    private int commentParentUserId = Comment.INIT_ID;

    /**
     * 被评论者的昵称
     */
    private String CommentParentUserNick;

    /**
     * 被评论的数量
     */
    private int commentedCount;

    /**
     * 评论创建的时间
     */
    private Timestamp createTime;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getCommentId() {
        return commentId;
    }

    public void setCommentId(int commentId) {
        this.commentId = commentId;
    }

    public String getCommentNick() {
        return commentNick;
    }

    public void setCommentNick(String commentNick) {
        this.commentNick = commentNick;
    }

    public String getCommentAvatar() {
        return commentAvatar;
    }

    public void setCommentAvatar(String commentAvatar) {
        this.commentAvatar = commentAvatar;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public int getArticleId() {
        return articleId;
    }

    public void setArticleId(int articleId) {
        this.articleId = articleId;
    }

    public int getCommentParentId() {
        return commentParentId;
    }

    public void setCommentParentId(int commentParentId) {
        this.commentParentId = commentParentId;
    }

    public int getCommentParentUserId() {
        return commentParentUserId;
    }

    public void setCommentParentUserId(int commentParentUserId) {
        this.commentParentUserId = commentParentUserId;
    }

    public String getCommentParentUserNick() {
        return CommentParentUserNick;
    }

    public void setCommentParentUserNick(String commentParentUserNick) {
        CommentParentUserNick = commentParentUserNick;
    }

    public int getCommentedCount() {
        return commentedCount;
    }

    public void setCommentedCount(int commentedCount) {
        this.commentedCount = commentedCount;
    }

    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }
}
